package com.pl.lc.user.controller;


import com.pl.lc.common.vo.R;
import com.pl.lc.user.service.SmsLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 3.短信发送表 前端控制器
 * </p>
 *
 * @author pl
 * @since 2024-06-05
 */
@RestController
@RequestMapping("/sms")
public class SmsLogController {
    @Autowired
    private SmsLogService smsLogService;
    /**
     * 发送注册验证码
     * @param phone
     * @return
     */
    @RequestMapping("/sendrcode")
    public R sendRegisterCode(@RequestParam("phone") String phone){
        return smsLogService.sendRegisterCode(phone);
    }
    /**
     * 发送登录验证码
     */
    @RequestMapping("/sendlcode")
    public R sendLoginCode(@RequestParam("phone") String phone){
        return smsLogService.sendLoginCode(phone);
    }
}

